from dash import Dash, html
from flask import Flask

server = Flask(__name__)

app1 = Dash(name='app1', server=False)
app1.layout = html.Div('This is App1')

app2 = Dash(name='app2', server=False)
app2.layout = html.Div('This is App2')

routes = {
    '/dash-app1/': app1,
    '/dash-app2/': app2,
}

for route, app in routes.items():
    app.init_app(server, routes_pathname_prefix=route, requests_pathname_prefix=route)


@server.route('/')
def index():
    return "<p>Hello, World!</p>"


if __name__ == '__main__':
    server.run()